package com.az.order.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单表
 * @TableName orders
 */
@TableName(value ="orders")
@Data
public class Orders implements Serializable {
    /**
     * 订单ID（主键，自增）
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;

    /**
     * 用户ID（外键）
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 订单日期
     */
    @TableField(value = "order_time")
    private Date orderTime;

    /**
     * 订单状态( 常量类中定义值 )
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 收货人
     */
    @TableField(value = "consignee")
    private String consignee;

    /**
     * 取消原因
     */
    @TableField(value = "cancel_reason")
    private String cancelReason;

    /**
     * 商品总金额
     */
    @TableField(value = "prices")
    private BigDecimal prices;

    /**
     * 出货时间
     */
    @TableField(value = "shipping_time")
    private Date shippingTime;

    /**
     * 地址编号
     */
    @TableField(value = "address_id")
    private Integer addressId;

    /**
     * 
     */
    @TableField(value = "version")
    private Integer version;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}